<div class="messageContent">
<div id="DivIdToPrint">
<h3><?php echo $object->titre?></h3>
<?php if($object->header):?>
<div class="header">
<?php echo $object->header?>
</div>
<?php endif;?>
<?php if($object->contenu):?>
<div class="corps">
<?php echo $object->contenu?>
</div>
<?php endif;?>
<?php 
	$q = Doctrine::getTable('attachment')
		->createQuery('m')
		->where('owner_id= ?',$object->id)
		->andWhere("ownerclass = ?",get_class($object));
	$q->setHydrationMode(Doctrine_Core::HYDRATE_ARRAY);	
	$records =	$q->execute();
	if(count($records) > 0)
	{
		$objectDef = new objectDef('attachment');
		echo $objectDef->renderListTable($records,'',array('public'),true,false,false);
	}
?>
</div>
<a href="#" onclick="printDiv();return false;"><img src="/images/icons/48/print.png" title="<?php echo __('Print')?>"></a>

</div>
